﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BuXiaChu.OrderDishes.Model;
using BuXiaChu.OrderDishes.DAL;

namespace BuXiaChu.OrderDishes.BLL
{
    public class ShareCodeManager
    {
        #region ShareCode 

        public static bool Add(ShareCodeModel obj)
        {
            return ShareCodeDAL.Save(obj);
        }

        public static ShareCodeModel GetByShareCodeId(long codeID)
        {
            return ShareCodeDAL.GetByShareCodeId(codeID);
        }

        public static bool DeleteShareCode(long codeID)
        {
            return ShareCodeDAL.DeleteShareCode(codeID);
        }

        public static List<ShareCodeModel> GetShareCodeListByClassID(long classID)
        {
            return ShareCodeDAL.GetShareCodeListByClassID(classID);
        }

        public static List<ShareCodeModel> GetShareCodeList()
        {
            return ShareCodeDAL.GetShareCodeList();
        }

        public static List<ShareCodeModel> GetShareCodeListByParentID(long parentID)
        {
            return ShareCodeDAL.GetShareCodeListByParentID(parentID);
        }

        public static List<ShareCodeModel> GetListByParentIDandClassId(long parentID, long classId)
        {
            return ShareCodeDAL.GetListByParentIDandClassId(parentID,classId);
        }

        #endregion

        #region ShareCodeClass

        public static bool Add(ShareCodeClassModel obj)
        {
            return ShareCodeClassDAL.Save(obj);
        }

        public static bool DeleteShareCodeClass(long classId)
        {
            return ShareCodeClassDAL.Delete(classId);
        }

        public static List<ShareCodeClassModel> GetShareCodeClassList()
        {
            return ShareCodeClassDAL.GetShareCodeClassList();
        }

        public static ShareCodeClassModel GetByShareCodeClassId(long classID)
        {
            return ShareCodeClassDAL.GetByShareCodeClassId(classID);
        }

        #endregion
    }
}
